package com.jt.controller;

import com.jt.vo.EasyUITable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import com.jt.service.ItemService;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ItemController {
	
	@Autowired
	private ItemService itemService;

	/**
	 * 1.实现商品类标展现
	 * url地址: http://localhost:8091/item/query?page=1&rows=20
	 * 参数:	page页数    rows 行数
	 * 返回值:  EasyUITable
	 */
	@RequestMapping("/item/query")
	public EasyUITable findItemByPage( int page, int rows){

		return itemService.findItemByPage(page,rows);//通过业务层进行数据库查询一封装数据就搞定了
	}

}
